package com.yida.wy.common.web.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.yida.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * Entity基类
 *
 * @author yida
 */
@Data
public class BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 创建者
     */
    @Excel(name = "创建者")
    @ApiModelProperty(value= "创建者")
    private String createBy;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间")
    @Column(onInsertValue = "now()")
    @ApiModelProperty(value= "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新者
     */
    @Excel(name = "更新者")
    @ApiModelProperty(value= "更新者")
    private String updateBy;

    /**
     * 更新时间
     */
    @Excel(name = "更新时间")
    @Column(onUpdateValue = "now()")
    @ApiModelProperty(value= "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value= "备注")
    private String remark;

    /**
     * 页码
     */
    @Column(ignore = true)
    @Excel(name = "页码")
    @ApiModelProperty(value= "页码")
    private Integer pageNum;

    /**
     * 分页条数
     */
    @Column(ignore = true)
    @Excel(name = "分页条数")
    @ApiModelProperty(value= "分页条数")
    private Integer pageSize;

}
